﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vUser
	/// </summary>
	[Serializable]
	public class vUser : Entity 
	{ 
		 public vUser() 
            : base("vUser") 
        { 

        }


		#region Model
		private int _UID;
		private int? _UserID;
		private string _UserCode;
		private string _UserName;
		private string _Password;
		private bool? _SSO;
		private bool? _IsDisable;
		private bool? _IsJob;
		private bool? _IsSystem;
		private bool? _FullRight;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserID
		{
			get{ return _UserID; }
			set
			{
				this.OnPropertyValueChange(_.UserID,_UserID,value);
				this._UserID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserCode
		{
			get{ return _UserCode; }
			set
			{
				this.OnPropertyValueChange(_.UserCode,_UserCode,value);
				this._UserCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserName
		{
			get{ return _UserName; }
			set
			{
				this.OnPropertyValueChange(_.UserName,_UserName,value);
				this._UserName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Password
		{
			get{ return _Password; }
			set
			{
				this.OnPropertyValueChange(_.Password,_Password,value);
				this._Password = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? SSO
		{
			get{ return _SSO; }
			set
			{
				this.OnPropertyValueChange(_.SSO,_SSO,value);
				this._SSO = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsDisable
		{
			get{ return _IsDisable; }
			set
			{
				this.OnPropertyValueChange(_.IsDisable,_IsDisable,value);
				this._IsDisable = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsJob
		{
			get{ return _IsJob; }
			set
			{
				this.OnPropertyValueChange(_.IsJob,_IsJob,value);
				this._IsJob = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSystem
		{
			get{ return _IsSystem; }
			set
			{
				this.OnPropertyValueChange(_.IsSystem,_IsSystem,value);
				this._IsSystem = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? FullRight
		{
			get{ return _FullRight; }
			set
			{
				this.OnPropertyValueChange(_.FullRight,_FullRight,value);
				this._FullRight = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.UserID,
				_.UserCode,
				_.UserName,
				_.Password,
				_.SSO,
				_.IsDisable,
				_.IsJob,
				_.IsSystem,
				_.FullRight,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_UserID,
				_UserCode,
				_UserName,
				_Password,
				_SSO,
				_IsDisable,
				_IsJob,
				_IsSystem,
				_FullRight,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "UserID":
                    this._UserID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "UserCode":
                    this._UserCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserName":
                    this._UserName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Password":
                    this._Password = DataHelper.ConvertValue<string>(value);
                    break; 
				case "SSO":
                    this._SSO = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsDisable":
                    this._IsDisable = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsJob":
                    this._IsJob = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsSystem":
                    this._IsSystem = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "FullRight":
                    this._FullRight = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "UserID":
                    return this._UserID; 
				case "UserCode":
                    return this._UserCode; 
				case "UserName":
                    return this._UserName; 
				case "Password":
                    return this._Password; 
				case "SSO":
                    return this._SSO; 
				case "IsDisable":
                    return this._IsDisable; 
				case "IsJob":
                    return this._IsJob; 
				case "IsSystem":
                    return this._IsSystem; 
				case "FullRight":
                    return this._FullRight; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vUser");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","vUser","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserID = new Field("UserID","vUser","UserID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCode = new Field("UserCode","vUser","UserCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserName = new Field("UserName","vUser","UserName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Password = new Field("Password","vUser","Password");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SSO = new Field("SSO","vUser","SSO");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsDisable = new Field("IsDisable","vUser","IsDisable");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsJob = new Field("IsJob","vUser","IsJob");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSystem = new Field("IsSystem","vUser","IsSystem");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FullRight = new Field("FullRight","vUser","FullRight");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","vUser","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","vUser","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","vUser","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","vUser","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","vUser","ModifyDate");
		}
		#endregion

 
	}
}

